﻿using System;
using RiftAddonStudio.Project.OptionPages;
using RiftAddonStudio.Services;

namespace RiftAddonStudio.Project.Services
{
    public class AddonStudioSettings : IAddonStudioSettings
    {
        private readonly ProjectPackage projectPackage;

        /// <summary>
        /// Initializes a new instance of the <see cref="AddonStudioSettings"/> class.
        /// </summary>
        /// <param name="projectPackage">The project package.</param>
        public AddonStudioSettings(ProjectPackage projectPackage)
        {
            if (projectPackage == null)
                throw new ArgumentNullException("projectPackage");

            this.projectPackage = projectPackage;
        }

        /// <summary>
        /// Occurs when the background image file changes.
        /// </summary>
        public event EventHandler BackgroundImageFileChanged
        { // Not Implemented yet
            //add { projectPackage.GetDialogPage<FrameXmlDesignerGeneralOptionsDialogPage>().BackgroundImageFileChanged += value; }
            //remove { projectPackage.GetDialogPage<FrameXmlDesignerGeneralOptionsDialogPage>().BackgroundImageFileChanged -= value; }
        }

        /// <summary>
        /// Gets the BackgroundImageFile setting.
        /// </summary>
        public string BackgroundImageFile
        { // Not Implemented yet
            //get { return projectPackage.GetDialogPage<FrameXmlDesignerGeneralOptionsDialogPage>().BackgroundImageFile; }
        }

        /// <summary>
        /// Gets the RiftBench folder setting.
        /// </summary>
        public string CustomRiftBenchPath
        { // Not Implemented yet
            //get { return projectPackage.GetDialogPage<WowBenchGeneralOptionsDialogPage>().CustomWowBenchPath; }
            //set { projectPackage.GetDialogPage<WowBenchGeneralOptionsDialogPage>().CustomWowBenchPath = value; }
        }

        /// <summary>
        /// Gets the WoW base path folder setting.
        /// </summary>
        public string CustomDeploymentLocation
        { // Not Implemented yet
            //get { return projectPackage.GetDialogPage<AddOnStudioGeneralOptionsDialogPage>().CustomDeploymentLocation; }
        }

        /// <summary>
        /// Gets or sets a value indicating whether [open in editor].
        /// </summary>
        /// <value><c>true</c> if [open in editor]; otherwise, <c>false</c>.</value>
        public bool OpenInEditor
        { // Not Implemented yet
           // get { return projectPackage.GetDialogPage<AddOnStudioGeneralOptionsDialogPage>().OpenInEditor; }
            //set { projectPackage.GetDialogPage<AddOnStudioGeneralOptionsDialogPage>().OpenInEditor = value; }
        }

    }
}
